function alert(msg){
    /*var html = "<div style='width:80%;position:absolute;margin-left: 30%;top: 40%;'>\n\
        <div class='alert' style='height:40px;width:95%;line-height: 40px;background-color:black;border-radius:14px;color:#fff;opacity:0.8;border:black;text-align:center;z-index:99999;position:relative;'>"+msg+"</div>\n\
    </div>";*/
    var html = "<div class='alert' style='padding:0px;height:40px;width:80%;line-height: 40px;padding-bottom: 0px;left: 10%;top: 50%;background-color:black;border-radius:14px;color:#fff;opacity:0.8;border:black;text-align:center;z-index:99999;*position:absolute;position:fixed;margin:0px auto;'>"+msg+"</div>";
    $(".alert").remove();
    $("body").append(html);
    setTimeout("hidden_alert()",1000);
}
function hidden_alert(){
    $(".alert").fadeOut("slow");
}

function alertTips(msg){
    /*var html = "<div style='width:80%;position:absolute;margin-left: 30%;top: 40%;'>\n\
        <div class='alert' style='height:40px;width:95%;line-height: 40px;background-color:black;border-radius:14px;color:#fff;opacity:0.8;border:black;text-align:center;z-index:99999;position:relative;'>"+msg+"</div>\n\
    </div>";*/
    var html = "<div class='alert-tips' style='padding:15px;height:80px;width:80%;line-height: 30px;padding-bottom: 0px;left: 8%;top: 50%;background-color:black;border-radius:14px;color:#fff;opacity:0.8;border:black;text-align:center;z-index:99999;*position:absolute;position:fixed;margin:0px auto;'>"+msg+"</div>";
    $(".alert-tips").remove();
    $("body").append(html);
    setTimeout("hidden_alert1()",2000);
}
function hidden_alert1(){
    $(".alert-tips").fadeOut("slow");
}

function squareAlert(msg, type){
    var html = "<div id='alert' style='width:120px; height:120px; border-radius:4px; background:rgba(0,0,0,0.7); position:absolute; top:15%; left:50%; margin-left:-60px; text-align:center; display:none;'>";
    if(type){
        html += "<img src='/Public/image/Wyes.png' alt='' style='width:40%; background:transparent; margin-top:20px;'/>";
    }else{
        html += "<img src='/Public/image/Wno.png' alt='' style='width:40%; background:transparent; margin-top:20px;'/>";
    }
    html += "<p style='color:#fff; font-size:16px; font-weight:normal; background:transparent; margin-top:5%;'>"+msg+"</p></div>";
    $("body").append(html);
    $('#alert').fadeIn(500).fadeOut(1500);
}